home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
edit
/
wed211.zip
/
WEDREF.TXT
< prev
Wrap
Text File
|
1986-05-28
|
77KB
|
2,018 lines
WED Reference Manual
Version 2.10
Copyright (C) 1985, 1986
Mason Washington
and
Washington Computer Corporation
WED Reference Manual
Contents
REGISTRATION . . . . . . . . . . . . . . . . . . ii
NEW FEATURES IN VERSION 2.10 . . . . . . . . . . iv
1 INTRODUCTION . . . . . . . . . . . . . . . . . . 1-1
1.1 Program Description . . . . . . . . . . . . . . 1-1
1.2 Machine Requirements . . . . . . . . . . . . . . 1-1
1.3 Starting WED . . . . . . . . . . . . . . . . . . 1-1
1.4 The Command Line . . . . . . . . . . . . . . . . 1-2
1.5 The Status Line . . . . . . . . . . . . . . . . 1-3
1.6 The Text Window . . . . . . . . . . . . . . . . 1-3
1.7 Exiting WED . . . . . . . . . . . . . . . . . . 1-4
2 MOVING AROUND THE FILE . . . . . . . . . . . . . 2-1
2.1 Moving Around the Screen . . . . . . . . . . . . 2-1
2.2 Up Screen and Down Screen . . . . . . . . . . . 2-2
2.3 Repeat Factors . . . . . . . . . . . . . . . . . 2-2
2.4 The Goto Function . . . . . . . . . . . . . . . 2-2
3 CHANGING THE FILE . . . . . . . . . . . . . . . 3-1
3.1 Inserting Text . . . . . . . . . . . . . . . . . 3-1
3.2 Erasing Text . . . . . . . . . . . . . . . . . . 3-2
3.3 Exchanging Characters . . . . . . . . . . . . . 3-2
3.4 Locating and Replacing Text . . . . . . . . . . 3-3
4 ADVANCED COMMANDS . . . . . . . . . . . . . . . 4-1ä
4.1 Setting Pointers . . . . . . . . . . . . . . . . 4-1
4.2 Moving Text . . . . . . . . . . . . . . . . . . 4-1
4.3 Copying Text . . . . . . . . . . . . . . . . . . 4-2
4.4 Zapping Text . . . . . . . . . . . . . . . . . . 4-3
4.5 Appending Text from Another File . . . . . . . . 4-3
4.6 Writing Text to Another File . . . . . . . . . . 4-4
4.7 Formatting Text . . . . . . . . . . . . . . . . 4-5
4.8 Viewing Another File . . . . . . . . . . . . . . 4-6
4.9 Editing Other Files . . . . . . . . . . . . . . 4-6
4.10 The Setup Command . . . . . . . . . . . . . . . 4-7
5 THE WEDINST PROGRAM . . . . . . . . . . . . . . 5-1
5.1 Starting WEDINST . . . . . . . . . . . . . . . . 5-1
5.2 Using WEDINST . . . . . . . . . . . . . . . . . 5-2
5.3 Exiting WEDINST . . . . . . . . . . . . . . . . 5-4
Appendix A Command Summary . . . . . . . . . . . . . . A-1
Appendix B Initial Macro Settings . . . . . . . . . . . B-1
i
REGISTRATION
User feedback is an integral part of any successful
software system. Please share your impression of WED by dropping
us a line with your name, address, occupation and any comments
or suggestions you care to pass along. You might also mention
where you got the program, and how you intend to use it. Write
to:
Mason Washington
Washington Computer Corp
P.O. Box 16504
Alexandria, Virginia 22302
WED is distributed as user-supported software. I
encourage you to use the program and share it with friends as
long as:
o The program is distributed complete and unchanged.
o No fee or compensation is requested or received except
by Washington Computer Corp.
o WED is not distributed in conjunction with any other
product.
If you find this program of value we will appreciate
your support. A contribution of $25 is suggested.
User-supported software is a means for the computing
community to receive quality software while directly supporting
software authors. It is based on the ideas that:
o The value and utility of software is best assessed by
the user on his or her own system. Only after using
a program can one really determine whether it serves
personal applications, needs and tastes.
o The creation of independent personal computer software
can and should be supported by the computing community.
o Copying of programs should be encouraged, rather than
restricted. The ease with which software can be
distributed outside traditional commercial channels
reflects the strength, rather than the weakness, of
electronic information.
ii
Under the user supported concept, anyone may request
a copy of a user-supported program by sending a blank, formatted
diskette to the program author together with an addressed,
postage-paid return mailer. A copy of the program, along with
documentation, will be sent by return mail on the user's disk.
The program carries a notice suggesting a contribution
for the program. Making a contribution is voluntary on your
part.
Regardless of whether you make a contribution, you are
encouraged to copy and distribute the program for the private,
non-commercial use of others.
iii
NEW FEATURES IN VERSION 2.10
The following is a list of differences between Version
1.06 and Version 2.10.
o WED now supports multiple file editing capability.
You can command the editor to load two files at
the same time and then switch back and forth
between the two with a single keystroke.
o The List subcommand has been implemented. This
command provides directory listings from within
the editor.
o Colors have been added. You can now select the
background, text, and highlight colors that the
editor will use. You can make these choices in
either the editor Setup mode or with the WEDINST
program.
o The choice of end of line symbol has been added
to the Setup menu. You can now select the
character with which WED will show the position
of each carraige return.
o WED will now prompt for the name of the file to
edit if no name is supplied on the command line.
This makes it easier to run WED from menu systems.
o The search algorithm used by the Locate and
Replace commands has been improved. The speed of
these searches has been improved by a factor of
ten.
o WED now allows repeat factors when executing a
macro. This enables you to set up a macro and
then have the editor repeat it as many times as
you wish.
iv
1 INTRODUCTION.
1.1 PROGRAM DESCRIPTION.
WED is a screen oriented text editor designed primarily
for programmers. It is fast, easy to use, and provides such
advanced features as automatic indenting, user defined
macros and multiple file editing.
The program is a single executable file with no
overlays. This adds flexibility on hard disk systems. The
editor can be located in a default directory and then accessed
via the path command.
WED works well with the dBASE III system. It can be
set up as the default editor and/or word processor using the
TEDIT and WP keywords in your CONFIG.DB file.
When WED is invoked, it allocates all available memory
for use as the main edit buffer. The entire edit file will
be loaded into this buffer. With the file in RAM, the editor
does not need to access the disk during the edit session. This
enables WED to work extremely fast.
1.2 MACHINE REQUIREMENTS.
The WED editor will run on IBM PC's and compatibles
having at least one disk drive (floppy or winchester) and 256K
RAM. Since WED loads the entire file into memory, you will be
able to edit larger files on a machine with additional RAM.
This will not be a serious limitation to most people since WED
can edit a file as large as 94K on a basic 256K computer.
1.3 STARTING WED.
To invode the WED editor, type WED followed by the
enter key. WED will respond with the following prompt in the
upper left hand corner of the screen:
Edit What File?
Respond by entering the name of the file you wish to
edit. For example, to edit the file, "MEMO.TXT", which resides
on the "C" drive, type the following response:
Edit What File? C:MEMO.TXT<Enter>
WED will look for the file in the current subdirectory.
If it finds the file, it will load it into memory and place
1-1
the cursor at the top of the file. If the file does not exist,
WED will create a new file with the name you specified.
WED also allows you to specify a path. For example,
if the file MEMO.TXT is in the subdirectory, LETTERS, then you
should respond to the file name prompt as follows:
Edit What File? C:LETTERS\MEMO.TXT<Enter>
When this format is used, the editor will search the
specified subdirectory for the edit file. If you specify a
path that does not exist, WED will display an error message
and stop execution.
As WED loads a file, it checks the size to make sure
that it can fit into memory. If it finds that the file is too
large, it will display an error message and halt execution.
If this happens, you will have to break the file up into
several smaller files and then edit the smaller files one at
a time.
WED also allows you to specify the edit file on the
command line when invoking the editor. To use this method,
type "WED" followed by a space and then the name of the file
you wish to edit. For example, to edit the file MEMO.TXT,
type the following command from the DOS prompt:
WED MEMO.TXT
When using this short form, you may specify a drive
and a path as described above.
1.4 THE COMMAND LINE.
The top line of the edit screen is devoted to the
command line. When you first invoke WED, the command line
looks like this:
WED: Insert Erase Xchng Pointer Goto Copy Move Zap Locate
This command line gives you a quick reference to the
WED commands. To invoke any of the commands, just type the
first letter of the command listed on the command line.
Because WED has more commands than can fit on one
line, the Next command has been provided. This command enables
you to see the rest of the commands. Type "N", and WED will
show you additional commands.
1-2
1.5 THE STATUS LINE.
The status line is the second line on the main edit
screen. It provides you with useful information about the
current edit session. Below is an example of a typical status
line:
Document: A:DEMOFILE.TXT Size: 12K Free: 192K Char: 45 Line: 112
The first part of the line tells you the name of the
file you are editing. In this example, it is "A:DEMOFILE.TXT".
The next two entries tell you the size of the current edit
file and the amount of free memory available. Both of these
values are in kilobytes (about 1000 characters).
The last two entries give you information about the
current cursor position. The char field shows the relative
character position in the current line. In the above example,
the cursor is on the 45th character of the current line. In
most cases, this value will be the same as the column at which
the cursor resides. The char value will not match the screen
column if there are tab or control characters ahead of the
cursor.
The line field displays the current line number. This
is the line in the file on which the cursor is currently
positioned. The lines are numbered starting with the first
line in the file. Note that this line count only changes when
the cursor passes a return character. Thus, a file line longer
than eighty characters will wrap to the next screen line, but
will be considered to be one line by the editor.
1.6 THE TEXT WINDOW.
The lines below the status line are used to display
the actual text of the edit file. This area is called the
text window because it acts like a window into the file. This
window can be moved to any point in the file using the various
cursor movement commands described in section 2.
The text window has room for twenty-two lines. Each
line is terminated with a special end of line character that
looks like two left facing arrows. This character indicates
that there is a carriage return at the end of the line.
Sometimes, a file line will be longer than the eighty column
width of the screen. In this case, WED will wrap that line
around to the next screen line.
The WED editor has the ability to edit special
characters called control characters. These are the characters
obtained by holding down the <Ctrl> key while typing a letter
of the alphabet. Control characters are displayed by a carat,
1-3
"^", followed by the alphabetical character. For example,
ctrl-G will be displayed as follows: "^G". There is one
exception this rule. WED will ignore any Ctrl-J (linefeed)
characters in the file.
1.7 EXITING WED.
When you are finished editing a document, type Q to
invoke the quit command. WED will prompt you as follows:
QUIT: Keep Abandon <Esc>
Type K to keep the the changes you have made to the
file. If you are editing an existing document, the disk file
will be updated to reflect the changes made during this editing
session. The original file will be saved in a backup file with
the ".BAK" extension. For example, when you Quit Keep the
file "A:TEST.TXT", the original file will be renamed to
"A:TEST.BAK", and the new updated file will be saved as
"A:TEST.TXT".
If you type K to keep a new document, WED will create
a new file and not create a backup file.
Sometimes, when WED is saving a new or revised file,
it is possible to encounter a full disk or other disk problem.
If this occurs, WED will display an error message describing
the problem and then prompt you as follows:
QUIT: Keep Abandon <Esc> K Enter file to write to
You can now enter a new file name to which WED will
write the file. If the problem is a full disk, you can specify
a different disk drive and WED will write the file to that
disk.
If you don't want to save the changes you made during
the edit session, type A to abandon this edit session. WED
will return you to the DOS prompt without updating the edit
file.
If you do not want to quit the editor, you can press
the <Esc> key and WED will return to the edit mode.
1-4
2 MOVING AROUND THE FILE.
2.1 MOVING AROUND THE SCREEN.
2.1.1 The Arrow Keys.
The WED editor provides many commands for moving the
cursor around the screen. The most often used are the arrow
keys on the numeric keypad at the right of the keyboard. The
left and right arrow keys move the cursor one character to the
left and right respectively. Notice that when you try to move
past the end of the line, the cursor is moved to the first
character of the next line conversely, if you try to move left
past the first column of the line, the cursor will move up to
the last character on the line above.
An easier way to move the cursor up or down one line
is provided with the up and down arrow keys. The up arrow key
moves the cursor up one line. If possible, WED will move the
cursor to the same column in the above line. If the line above
does not extend out to the current column, then the cursor will
be placed on the last character of that line. The down arrow
key performs just like the up key, but in the opposite
direction.
There is another key that performs a similar function
to the down cursor key. Pressing the return key moves the
cursor to the first character of the next line.
2.1.2 The Home and End Keys.
There are more keys that provide for convenient movement
of the cursor. Pressing the Home key moves the cursor to the
first character on the current line, and pressing the End key
moves the cursor to the last character of the line.
2.1.3 The Right Word and Left Word Commands.
The Right Word and Left Word commands are similar to
the right and left arrow keys, only faster. To invoke these
commands, hold down the control key while pressing either the
right or left cursor key. Right Word moves the cursor to the
first character of the next word to the right, and Left Word
moves the cursor to the first character of the next word to
the left.
2.1.4 The Space Bar.
The Space command is similar to the Right Word command.
Press the space bar, and WED will move the cursor to the next
space or carriage return character.
2-1
2.2 UP SCREEN AND DOWN SCREEN.
The up and down arrow keys are fine for moving around
the screen, but sometimes you need to move the cursor more than
just a couple of lines. The up screen and down screen functions
are useful for these situations. These commands move the cursor
an entire screen at a time. This is about twenty-two lines.
The Down Screen function can be activated by pressing
either the <PgDn> or the "D" key, and the Up Screen function
by using either the <PgUp> or the "U" key. Both of these
functions can be used with a repeat factor to move large
distances through the file. Repeat factors are explained
below.
2.3 REPEAT FACTORS.
Sometimes, when moving around the file, it is necessary
to repeat a command several times. For example, if you want
to move the cursor down five screens of text, you have to press
the <PgDn> key five times. WED provides an easier way of
repeating a command.
Many commands can be preceded by a repeat factor.
Entering a repeat factor before a command tells WED to execute
that command n times. To enter a repeat factor, type the number
(between 1 and 9999) and then press the appropriate command key.
For example to move the cursor down 5 screens, type the
following: 5<PgDn>
2.4 THE GOTO FUNCTION.
The Goto command provides a means for quickly moving
the cursor to a particular place in the file. With the Top
and Bottom subcommands, you can move directly to the top or
the bottom of the file. The Line subcommand enables you to
move directly to any line by specifiying a particular line
number. Also, the Goto command allows you to move directly
to any pointer you have set during the edit session. For more
information on pointers, refer the section on setting pointers.
To invoke Goto, type G. The prompt will change to the
following:
GO TO: Top, Bottom, Line
If any pointers are set, they will be shown to the
right of "Line". For example, if pointers 1 and 2 are set
the prompt will look like this:
2-2
GO TO: Top, Bottom, Line, 1 2
Now just type T for Top, B for Bottom, L for a
particular line number, or the number of one of the pointers
that is set. The cursor will be moved directly to that
location.
If type L to go directly to a particular line. WED
will prompt you for a line number:
GO TO: LINE: Enter line number, then <ret>
Enter the line number you wish to move the cursor to,
and then complete the command by pressing the return key.
2-3
3 CHANGING THE FILE.
3.1 INSERTING TEXT.
There are two commands for inserting text into a
document. The first command, Insert Character, is useful for
inserting just a few characters into a document. It allows
you to insert any displayable character, a carriage return,
or a space character. To use this command, place the cursor
at the position you want to insert a new character, press the
plus <+> key, and WED will insert a space at the cursor
location. Now you can type any single character over the new
space or you can press the plus key to insert another space
character. Note that you cannot insert a plus or minus
character with this command because these keys are reserved
for inserting and deleting characters. If you need to insert
one of these characters, use the standard insert command
described below.
The second command, Insert, can be invoked by either
typing I, or by pressing the <Ins> key. This command allows
you to enter continuous text without pressing the <+> key before
each character. To use this command, move the cursor to the
character in front of which you want to insert text, and type
I or press then <Ins> key to enter the Insert mode. WED will
then open two blank lines in which you can begin entering new
text. Also, the command line will change to the following:
INSERT: Enter text, then <Ins>
You can now enter the text you wish to insert. While
you are in Insert mode, there are two keys available for
correcting mistakes: the backspace key (the key directly above
the <Enter> key) will erase the last character entered, and
the <Home> key will erase all of the characters entered on the
current line.
As you add lines, the text below the insert will
automatically drop down to make more room. If auto indent
mode is turned on, WED will insert spaces for indentation at
the beginning of each new line. Refer to section 4.10 for more
information on auto indenting. When you have typed all that
you want to insert, press the <Ins> to exit insert mode. The
gap after the inserted text will be closed, and the command
line will return to its normal state.
You can abort an insert session by pressing the <Esc>
key while in insert mode. WED will prompt you with the question
"ABORT(Y/N)?" in the upper right hand corner of the screen.
Enter "N" to continue inserting, or "Y", to abort the session.
The file will remain as it was before the insert mode was
entered.
3-1
3.2 ERASING TEXT.
WED provides three commands for erasing text from a
document. The first two commands, Delete Character and Erase,
are described in this section. The third command, Zap, is
described in section 4.4.
The Delete Character command is best for erasing just
a few characters. There are two variations of this command:
Delete Left and Delete cursor. To delete left, press the
backspace key and WED will delete the character immediately
to the left of the cursor. To delete cursor, press the minus
key (located at the far right on the keyboard) and the character
under the cursor will be deleted.
For removing more than a few characters at a time, the
Erase command is more practical. This command can be invoked
by pressing either the "E" or the <Del> key. To use the command,
move the cursor to the first character of the section of text
that you want to remove. Then press either the E or <Del> key
and the following prompt will be displayed:
ERASE: Move Cursor, then <Del>
Now move the cursor to the last character of the text
to be removed. Note that you cannot move the cursor below the
last line on the current screen. As you move the cursor, the
text between the starting point and the cursor will be shown
in low intensity to designate that text as marked for erasure.
Notice that you can move the cursor to the left and/or up to
un-mark text. When the cursor is on the last character of the
text to be erased, press the <Del> key and the text will be
removed. If, while you are using the erase command, you decide
that you really don't want to erase this text, you can press
the <Esc> key and WED will abort the Erase command.
3.3 EXCHANGING CHARACTERS.
Sometimes while you are editing a document you will
need to make small changes in the text for which the sequence
of erasing the old text and inserting new text is burdensome.
The Exchange command is provided for this purpose. This command
allows you to overwrite existing text. To invoke the command,
type X and the following prompt will be displayed:
XCHNG: Enter text, then <Esc>
Now, any characters you type will write over the old
text. If you want to skip over text, you can move the cursor
around the screen with the arrow keys or the <Home> or <End>
keys. You can also erase characters to the left of the cursor
3-2
using the backspace key. When you are done, press the <Esc>
key and WED will return from Exchange mode.
3.4 LOCATING AND REPLACING TEXT.
You can locate, locate and replace, or locate and
delete any word or phrase (string of characters) in your file
by using the Locate and Replace commands. Your string can be
as long as 30 characters.
To invoke the Locate command, type L and the following
prompt will be displayed:
LOCATE: Enter text, then <RET>
Now type the word or phrase you wish to locate.
Complete the entry by pressing the return key. WED will then
prompt you for options:
Options (count, Back, Whole, ignore Case, No query, Global):
These options are explained in section 3.4.1. To search
without options, just press the return key. WED will now search
from the current cursor location down towards the end of the
file. If it finds the phrase you entered, the cursor will be
moved to that location in the file. If it cannot find the
phrase, the cursor will be left where it was when you invoked
the Locate command.
If you now wish to locate the next occurrence of your
phrase, type ctrl-L (hold down the <Ctrl> key while pressing
the L key) and WED will locate the next occurrence of that
phrase using the same locate options.
The Replace command is similar to the Locate command.
To invoke it, type R and the following prompt will be displayed:
REPLACE: Enter old text, then <ret>
Now type the word or phrase you wish to replace.
Complete the entry by pressing the return key. WED will then
prompt you for the replacement word or phrase:
Enter new text, then <ret>
Now enter the replacement string and complete the entry
with the return key. The options prompt will then be displayed:
Options (count, Back, Whole, ignore Case, No query, Global):
To replace without options, just press the return key.
WED will now search from the current cursor location down
3-3
towards the end of the file. If it finds the phrase you
entered, the cursor will be moved to that location in the
file, and the prompt "REPLACE?" will appear in the upper right
corner of the screen. Type "Y" and the string will be replaced.
If it cannot find the phrase, the cursor will be left in its
original position.
If you want to perform the same replacement on the next
occurrence of the string, type ctrl-R and WED will repeat the
Replace command, using the same search and replacement strings
and the same options.
3.4.1 Locate and Replace Options.
Six options help you to define the scope of your locate
or replace operation, each in a specific way. When you just
press the return key at the options prompt, WED looks for an
exact string of characters and conducts the search forward from
the current cursor position. The options give you considerably
more flexibility. You can choose none, one or several of the
options.
Count Option.
With the Locate command, you can use the Count option
to locate the nth occurrence of your string. To use the Count
option, simply enter the number of occurrences desired. For
example, if the string is "Smith" and you enter 15 as an option,
the cursor will be moved to the fifteenth occurrence of "Smith"
(or the last occurrence of "Smith" if WED finds less than
fifteen).
When using the Replace command, the Count option causes
WED to replace the next n occurrences of your string. For
example, if the string is "Smith" and you enter 3 as an option,
the next three occurrences of "Smith" will be replaced.
Backwards Option.
The Backward option, B, causes WED to search backward
from the current cursor location to the beginning of the file.
It can be used with either the Locate or the Replace command.
Whole Words Option.
Type W to invoke the Whole words option. This instructs
WED to search for whole words only. It will not find strings
that are embedded in other words. For example, if your search
string is "the" and the cursor is at the beginning of the
following line:
"and then the . . ."
3-4
Locate will not stop at "then" even though it begins with the
string "the". Instead, Locate will stop at the word "the".
Ignore Case Option.
Use C to invoke the Ignore Case option. This option
instructs WED to ignore the difference between upper and lower
case letters. It will find all occurrences of the string,
regardless of which letters are capitalized.
No Query Option.
The No Query option, N, only pertains to the Replace
command. Normally, the Replace command asks for your approval
before each replace operation. With the No Query option, you
instruct WED to replace without querying for approval. This
feature is useful when performing multiple replaces. When
replacing with the No Query option, WED will show you each
replacement as it occurs, unless you also choose the Global
option, in which case WED performs all replacements before
showing the altered file.
Global Option.
With the Global option, G, you can instruct WED to
replace all occurrences of your string in the entire file. WED
will start processing at the beginning of the file and work
towards the end. If you use this option in conjunction with
the Backward option, WED will start at the end of the file and
work towards the beginning. When you use this option with the
No Query option, WED will perform all replaces before showing
you the altered file.
3-5
4 ADVANCED COMMANDS.
4.1 SETTING POINTERS.
WED allows you to set up to eight pointers in the text
while you are editing. These pointers can be used for quick
cursor movement with the Goto command, or they can be used to
mark text for block commands such as move and copy which are
described below.
To set a pointer, you must first move the cursor to
the location you want to place the pointer. Then type P to
invoke the Set Pointer command. The prompt line will now look
like this:
SET POINTER: 1 2 3 4 5 6 7 8
The numbers corresponding to pointers that are already
set will be displayed in low intensity. If any of the pointers
are set to a position within the text window, their position in
the text will be indicated with the pointer number enclosed in
square brackets. For example, pointer one points to the first
character of the second line in the following text:
This is the first line.<
This is the second line.<
This is the third line.<
When the pointer command is invoked, the three lines
will look like this:
This is the first line.<
[1]This is the second line.<
This is the third line.<
Select a pointer by typing a number between one and
eight, and that pointer will be set to the current cursor
location. If you pick a pointer that is already set, it will
forget the old location and be set to the current location.
WED will indicate the new setting by displaying the pointer
number in square brackets at the new pointer position in the
text.
4.2 MOVING TEXT.
The Move command moves a marked section of text from
one part of a file to another. This is a useful command if
you want to move an entire paragraph or section of a file to
another location within the file.
4-1
Before you can execute the move command, you must place
pointers at the beginning and the end of the block of text that
you want to move. After you have marked the block to be moved,
move the cursor to the desired target location. Now invoke the
Move command by typing M. The following prompt will displayed:
MOVE: Top, Bottom 1 2 from
In this example, the number 1 and 2 pointers have been
set, as indicated by the "1" and the "2" in the prompt line.
Now enter the number of the pointer that marks the beginning
of the block to be moved. Note that you can also use the Top
or Bottom of the file as an end point. After you have entered
the first pointer number (in this example, 1), the prompt will
change to the following:
MOVE: Top, Bottom 1 2 from 1, to
Now enter the number of the pointer that marks the end
of the block to be moved, and WED will move the block of text
to the current cursor location.
4.3 COPYING TEXT.
The copy command makes a duplicate copy of a marked
section of text in the file and places that copy at the current
cursor location. This is a useful command if you want to repeat
a section of your text once or more in a file.
Before you can execute the Copy command, you must place
pointers at the beginning and the end of the block of text that
you want to copy. After you have marked the block to be copied,
move the cursor to the desired target location. Now invoke the
Copy command by typing C. The following prompt will be
displayed:
COPY: Top, Bottom 1 4 from
In this example, the number 1 and 4 pointers have been
set as indicated by the "1" and the "4" in the prompt line.
Now enter the number of the pointer that marks the beginning
of the block to be copied. Note that you can also use the Top
or Bottom of the file as an end point. After you have entered
the first pointer number (in this example, 1), the prompt will
change to the following:
COPY: Top, Bottom 1 4 from 1, to
Now enter the number of the pointer that marks the end
of the block to be copied, and WED will copy the block of text
to the current cursor location.
4-2
4.4 ZAPPING TEXT.
The Zap command provides a quick way to delete large
sections of text from your file.
Before you can execute the Zap command, you must place
pointers at the beginning and the end of the block of text that
you want to delete. After you have marked the block to be
deleted, type Z to invoke the Zap command. WED will prompt
you as follows:
ZAP: Top, Bottom 1 2 from
In this example, the number 1 and 2 pointers have been
set as indicated by the "1" and the "2" in the prompt line.
Now enter the number of the pointer that marks the beginning
of the block to be deleted. Note that you can also use the
Top or Bottom of the file as an end point. After you have
entered the first pointer number (in this example, 1), the
prompt will change to the following:
ZAP: Top, Bottom 1 2 from 1, to
Now enter the number of the pointer that marks the end
of the block to be deleted, and WED will delete the block of
text from the file.
4.5 APPENDING TEXT FROM ANOTHER FILE.
The Append command enables you to insert text from
another file into the file you are currently editing. To invoke
the Append command, first move the cursor to the position at
which you want the other file inserted, and then type A. The
following prompt will be displayed:
APPEND: List, Insert
Now type I to insert another file. WED will respond
with the prompt:
INSERT: Enter Document Name
Enter the name of the file you wish to insert. Include
the disk drive and path if desired. If you don't, WED will
default to the same disk and path of the main edit file. WED
will now insert that entire file into the file you are editing
at the current cursor location.
The List command is provided as an option on the
append menu to aid in finding the file you wish to insert.
This command is similar to the DOS Dir command. To execute
4-3
this command, type L while in the Append menu. WED will
respond with the following prompt:
LIST: Directory of what?
Now enter the search pattern for which you would
like to see a directory listing. You can use wild cards
just as you can with the DOS Dir command. You can also
specify a drive and/or a path. If you don't, the directory
listing will default to the drive and/or path of the
current edit file.
The editor will then display the files matching
the specified search pattern. If there is more than one
screen full of names, WED will pause between each page
and display this prompt:
LIST: *.* <any key> to see more; <Esc> to edit
In this example, the search pattern was "*.*".
At this point, you can press any key but the escape key,
and WED will show you the next screen full of file names.
If you press the escape key, the editor will abort the
listing and return to the main edit menu.
When WED reaches the end of the directory listing,
it will prompt like this:
LIST: *.* <any key> to edit
Just press any key on the keyboard, and WED will
return to the main edit menu.
4.6 WRITING TEXT TO ANOTHER FILE.
The Write command writes a marked block of text in
the current text out to a new file on disk. It is a useful
command for creating stock paragraphs or for saving sections
of a file that will later be inserted into other files.
Before you can execute the Write command, you must
place pointers at the beginning and the end of the block of
text that you want to write. After you have marked the block
to be written, type W to invoke the write command. WED will
prompt you as follows:
WRITE: Top, Bottom 1 2 from
In this example, the number 1 and 2 pointers have been
set as indicated by the "1" and the "2" in the prompt line.
Now enter the number of the pointer that marks the beginning
of the block to be written. Note that you can also use the
Top or Bottom of the file as an end point. After you have
4-4
entered the first pointer number (in this example, 1), the
prompt will change to the following:
WRITE: Top, Bottom 1 2 from 1, to
Now enter the number of the pointer that marks the end
of the block to be written. WED will now ask you for the file
to write to:
WRITE: Top, Bottom 1 2 from 1 to 2 to Document
Enter the name of the file to which you wish to write
the block of text and press the return key. You can include
a disk drive and path when entering the name. If you don't,
WED will default to the same disk and path as the main edit
file. WED will now write the marked text out to the specified
file. Note that if you specify the name of an existing file,
that file will be replaced by the new file.
4.7 FORMATTING TEXT.
The Format command allows you to move blocks of text
to the left or right. It is useful for programmers working
in structured languages such as PASCAL. With this command,
you can change the indentation of entire blocks of code with
one command.
Before you can execute the format command, you must
place pointers at the beginning and the end of the block of
text that you want to re-format. After you have marked the
block, type F to invoke the Format command. WED will prompt
you as follows:
FORMAT: Indent, Undent
If you want to move the text block to the right, type
I to indent. Otherwise, type U to unindent the block (move
it to the left). WED will prompt you for the number of spaces
to move the text:
INDENT: how many spaces?
Now enter the number of spaces to move the text, and
WED will then ask for the end points of the block of text:
INDENT (2): Top, Bottom 1 2 from
Notice that WED displays the number of spaces to indent
(or unindent) in parentheses. In this example, the number of
spaces is set to 2. Enter the number of the pointer that marks
the beginning of the block. WED then prompts you for the end
of the block:
4-5
INDENT (2): top, Bottom 1 2 from 1 to
Enter the number of the pointer that marks the end of
the block. WED will then go to work re-indenting the block
of text.
4.8 VIEWING ANOTHER FILE.
The View command allows you to view one file while
editing another file. This command is useful if you need to
make a reference in the current file to something specific
in another file.
To execute the View command, type V and WED will prompt
you for the name of the file to be viewed:
VIEW: Enter document name, then <Ret>
Enter the name of the file you want to look at and WED
will display the first half-screen of the file on the lower
half of the screen. Notice that the viewed file is displayed
in low intensity. You can now press any key to look at
succeeding sections of the file, or you can press <Esc> to
return to editing your main file.
4.9 EDITING OTHER FILES.
Often, while editing, you will run across situations
where you want to use a paragraph or section of code from
another file. To get this paragraph, you must exit the editor,
edit the other file, mark and write the desired paragraph to
a temporary file, exit the editor, reedit the current file,
and append the temporary file. Whew! The Other files
command makes this process much easier. This command allows
you to load a second file into the edit buffer without quiting
from the first file. Once the other file is loaded, you can
switch back and forth between the two with a single keystroke.
To execute the Other file command, type O from the
main edit menu. WED will check to make sure there is enough
memory available to create a new edit buffer. If there is,
it will respond with the following prompt:
EDIT OTHER: Enter document name
Respond by entering the name of the other file you
wish to edit. You can specify a drive and/or path if you
wish. If you don't, WED will default to the drive and/or
path of the current edit file. If you enter the name of a
file which does not exist, WED will create a new file.
4-6
Once the other file is loaded, you can edit it with
all the features available for the primary file. To switch
back to the primary file, just type O, and WED will display
and begin editing that file. You can switch back and forth
between the two files using the Other file command as often
as you like.
When you are done with one of the files, use the
Quit command to Save or Abandon that file. Note that you
can Quit either file and then, which ever file is left will
become the primary edit file. To Quit one of the files,
first switch to that file using the Other file command.
Then type Q from the main menu. WED will display the
standard quit menu. Respond with A to Abandon, or S to
Save the file. The editor will then Save or Abandon that
file, and then return to the other file. It will also
free up any buffer space used by the quit file so that the
Other file command can be used again.
4.10 THE SETUP COMMAND.
The setup command allows you to change the auto-indent
mode or tab mode, or to define up to ten macros. The changes
made with this command are temporary and only last until you
change them again or you exit the editor. If you want to make
your changes remain in effect each time you call up WED, then
you should use the WEDINST program described in chapter 5.
To enter the Setup mode, type S and the WED will prompt
you like this:
SETUP: Auto indent (on) Tabs (tabs) Eoln symbol Color Macros
Notice that the auto indent and tabs prompts are both
followed by a descriptor word in parentheses. These words
tell you the current state of the these flags.
You can set the auto indent mode, the tabs mode, or
define a macro. When you are ready to exit the Setup mode,
press the <Esc> key, and WED will return to the command mode.
4.10.1 Auto Indent.
The auto indent mode saves you key strokes when editing
programs which use indentation. This feature only operates
when the editor is in the Insert mode.
If auto indent is turned on and you are entering text
in Insert mode, then after each carriage return, WED will indent
the next line to the same level as the current line. It does
this by automatically entering spaces at the beginning of the
line. If you want to change the indentation level of the new
4-7
line, you can use either the backspace or space key to reduce
or increase the indentation level of the line.
You turn on or off the automatic indenting feature from
the Setup mode. Just type A to toggle on or off the auto indent
flag. The WEDINST program, described in chapter 5, includes a
function for specifying the default setting for the auto indent
flag.
4.10.2 Tabs.
The tab character is a special character in ASCII
files. When it is displayed on the screen, as with an editor,
it is displayed as a series of blanks. The number of blanks
is determined by the screen column on which the tab character
is positioned and on the current settings of the tab stops.
Enough blanks will be included to cause the next character to
be displayed at the next tab stop. In WED, the tab stops are
set every eight columns starting with column one. These
settings cannot be changed.
Tabs are most useful for lining up columns of numbers,
words or other text. They are also handy for quickly moving
the cursor out to a higher column. For example, moving to
column seventeen takes sixteen keystrokes with the space key,
but only two keystrokes with the tab key.
In high level languages, it is often convenient to be
able to move out to desired columns using the tab key, but it
is undesirable to have actual tab characters inserted into the
source file because they make it difficult to change
indentation.
WED provides an answer to this conflict. The Tabs flag
controls the action of the tab key in the Insert mode. When
this flag is set to "on", the tab key works normally and causes
a tab character to be inserted into the text. When the flag is
off, however, the tab key causes space characters to be inserted
instead of a tab character. Enough spaces will be inserted to
move the cursor to the next tab stop.
You can switch the Tabs flag between "tabs" and "spaces"
by typing T from Setup mode. The default setting for the Tabs
flag can be set using the WEDINST program described in chapter 5.
4.10.3 Eoln Symbol.
WED uses a special character to indicate the location
of carriage returns in your file. The default value for
this character is ASCII 174, which looks like a pair of
left facing arrows. You can change this character by typing
E from the setup menu. WED will prompt as follows:
CR SYMBOL: Current symbol is ASCII (174) "<"
Enter ASCII code for new symbol:
4-8
Notice that the editor displays the current value of
the character. Respond by entering the ASCII code for the
new end of line symbol. You must choose a value between 32
and 255. You can change the default for this character
with the WEDINST program described in chapter 5.
4.10.4 Colors.
The WED editor allows you to choose which colors it
will use during the edit session. It uses three diferent
colors, the Normal text color for displaying the text of
your file, the Highlighted text color for displaying text
marked for erasure, and the Background color. If you have
a color monitor, this can be an eye saving feature.
To change colors, type C while in the Setup menu,
and WED will respond with the following prompt:
SET COLOR: Normal (14) Highlight(7) Background (0) <Esc>
Notice that the current values for the three colors
are shown in parentheses. Type N to change the Normal text
color. The prompt will now look like this:
SET COLOR: Normal (14) Highlight(7) Background (0) <Esc>
Enter normal color:
Now enter the number of the new Normal text color.
The colors are numbered from 0 to 15 as listed below.
0 Black 8 Gray
1 Blue 9 Light Blue
2 Green 10 Light Green
3 Cyan 11 Light Cyan
4 Red 12 Light Red
5 Magenta 13 Light Magenta
6 Brown 14 Yellow
7 White 15 High-intensity White
To change the Highlight color, type H while in the
Setup menu and then follow the same procedure used to set
the Normal color.
Changing the Background color is similar to
changing the Normal or Highlight colors. There is one
difference though, you may only select a color from the
range 0 - 7.
Remember, changes to the colors made with the Setup
command will only remain in effect during the current edit
session. To make your color selections permanent, use the
WEDINST program described in chapter 5.
4-9
4.10.5 Macros.
The macro facility provided with WED is designed to
save you keystrokes and to allow you to customize the editor
to suit your needs. WED allows you to define up to ten macros,
one for each function key. A macro is a set of up to twenty
commands (keystrokes) that can be assigned to a particular
function key. When that key is pressed, the commands in the
macro will be executed just as if they had been entered from
the keyboard.
There are two ways to define a macro. You can use the
Setup command to define a macro while you are editing a file.
This method is quick and convenient, but the definition of the
macro will only last until you exit the editor. The other way
to define a macro is to use the WEDINST program described below.
With this program, the macros you define will actually be
written to the WED executable file and will remain in effect
until redefined with the WEDINST program. For your convenience,
the distribution copy of WED contains preset definitions for
each of the macros. The definitions of these macros are listed
in appendix B.
To define a macro from within WED, enter Setup mode
and type M to enter Macro Definition mode. WED will prompt
you as follows:
SET MACRO: 1 2 3 4 5 6 7 8 9 0 <Esc>
Now select a macro by pressing one of the ten function
keys. For example, to redefine macro number one, press the
<F1> key and WED will respond with the following:
Macro(1): GT
Enter new macro(1):
The first line shows you the current contents of the
macro. In this example, the macro contains the two commands
G and T (Goto Top). The second line allows you to enter the
new macro definition. Simply enter the commands you want the
macro to execute. If you make a mistake, you can correct it
with the back space key. When you have completed the macro
definition, press the same function key that you used to select
the macro (<F1> in the above example), and WED will record the
new definition. If you enter an empty macro (a macro with no
commands), WED will retain the original contents of the macro.
Once you have set up the macro, you can execute it
any time by just pressing the appropriate function key.
If you want WED to execute the macro more than once, you
can enter a repeat factor before you press the function key.
WED will attempt to execute the macro as many times as you
have requested, but if it encounters an error during
execution, it will halt execution of all macros and return
to the command mode.
4-10
5 THE WEDINST PROGRAM.
WEDINST is a separate program provided with the WED
editor. This program enables you to change the settings
normally changed with the Setup command in WED, only the changes
made with WEDINST will remain in effect from one edit session
to another. With WEDINST you can set the auto-indent mode on
or off, the tab mode spaces or tab characters, or enter new
definitions for any of the ten macro keys.
5.1 RUNNING WEDINST.
To use the WEDINST program, first make sure that both
the WED.EXE and WEDINST.EXE files are on the same disk and
subdirectory. You must also make sure that you are currently
logged into that disk and directory. Once you have accomplished
this, execute the WEDINST program by typing WEDINST from the
DOS prompt:
C:\EDITOR>WEDINST<Enter>
In the above example, both the WED.EXE and WEDINST.EXE
files should be in the EDITOR subdirectory on the C: drive.
If the WEDINST program cannot find the WED.EXE file, it will
display an error message and return control to DOS:
Unable to open object file: WED.EXE
If this occurs, double check that both files are on
the same drive and subdirectory and that you are currently
logged in to that drive and subdirectory. When the install
program begins execution, it will first display the following
message:
loading WED INSTALL UTILITY, V 2.10
The loading process takes a few seconds while WEDINST
loads the WED.EXE file. Next, WEDINST will display its standard
setup screen:
WED Editor Install Utility, V 2.10
SETUP: Auto indent (on), Tabs (spaces), Eoln symbol, Colors, Macros
==============================================================
Macro( 1): GT
Macro( 2): GB
Macro( 3): <Del><End><Del>
5-1
The top line of the setup screen identifies the version
number of the install program. The second line, the command
line, lists the available options and shows the current settings
for auto indent and tabs. The rest of the setup screen falls
below the double lines. WEDINST uses this area to display the
current contents of the ten macros.
5.2 USING WEDINST.
Now you are ready to change the setup fields in your
WED editor.
5.2.1 Auto Indent.
The first setup field listed on the command line is
auto indent. Notice that the word "on" or "off" appears next
to the auto indent prompt. This tells you what the current
setting is. To change the setting, just type A, and auto indent
will toggle on or off.
5.2.2 Tabs.
The next setup field is the tab field. Like the auto
indent prompt, the tab prompt shows the current setting in
parentheses. To change this setting, type T, and the tab
setting will toggle between tabs and spaces.
5.2.3 Eoln symbol.
WED uses a special character to indicate the location
of carriage returns in your file. The default value for
this character is ASCII 174, which looks like a pair of
left facing arrows. You can change this character by typing
E from the main install menu. WEDINST will prompt as follows:
WED Editor Install Utility, V 2.10
CR SYMBOL: Current symbol is ASCII (174) "<"
Enter ASCII code for new symbol:
Notice that the install program displays the current
value of the character. Respond by entering the ASCII code
for the new end of line symbol. You must choose a value
between 32 and 255.
5.2.4 Colors.
The WED editor allows you to choose which colors it
will use during the edit session. It uses three diferent
colors, the Normal text color for displaying the text of
your file, the Highlighted text color for displaying text
marked for erasure, and the Background color. If you have
a color monitor, this can be an eye saving feature.
5-2
To change colors, type C while in the main install
menu. WEDINST will respond with the following prompt:
WED Editor Install Utility, V 2.10
SET COLOR: Normal (14) Highlight(7) Background (0) <Esc>
Notice that the current values for the three colors
are shown in parentheses. Also, WEDINST will clear the
macros window and display samples of all sixteen available
colors. Type N to change the Normal text color. The
prompt will now look like this:
WED Editor Install Utility, V 2.10
SET COLOR: Normal (14) Highlight(7) Background (0) <Esc>
Enter normal color:
Now enter the number of the new Normal text color.
The colors are numbered from 0 to 15 as listed below.
0 Black 8 Gray
1 Blue 9 Light Blue
2 Green 10 Light Green
3 Cyan 11 Light Cyan
4 Red 12 Light Red
5 Magenta 13 Light Magenta
6 Brown 14 Yellow
7 White 15 High-intensity White
To change the Highlight color, type H while in the
Setup menu and then follow the same procedure used to set
the Normal color.
Changing the Background color is similar to
changing the Normal or Highlight colors. There is one
difference though, you may only select a color from the
range 0 - 7.
5.2.5 Macros.
To change the settings of a macro, type M, and WEDINST
will prompt you as follows:
SET MACRO: press <F1>..<F10> or <Esc>
Now press one of the ten function keys to change a
macro, or press the <Esc> key to return to the main prompt.
For example, if you press the <F6> key, WEDINST will display
this prompt:
Enter macro(6), then <F6>:
Now you can enter a new definition for macro 6. Just
type the keys that you want the macro to execute. You can use
5-3
the backspace key (the left arrow key above the <Enter> key)
to correct any mistakes. When you have completed the macro,
press the <F6> key to prompt WEDINST to accept the new macro
definition. WEDINST will update the appropriate macro listing
on the screen to reflect the new entry. Notice that if you enter
an empty macro, WEDINST will assume you do not want to change
the macro and will retain the original contents.
5.3 EXITING WEDINST.
When you have completed your session with WEDINST, type
Q to quit the program. The install program will ask if you
want to keep the changes you made during this session:
Do you want to save the changes?
If you want to keep your changes, type Y and WEDINST
will update the WED.EXE file. Now you can execute the updated
WED program. If you enter Setup mode you will notice that the
default settings now reflect any changes you made with WEDINST.
If you do not want to save the changes you made during
your install session, type N in response to the quit prompt,
and WEDINST will exit to DOS without updating the WED.EXE file.
5-4
Appendix A
Command Summary
<right arrow> Move right one character. 2.1.1
<left arrow> Move left one character. 2.1.1
<ctrl rt arrow> Move right one word. 2.1.3
<ctrl lf arrow> Move left one word. 2.1.3
<down arrow> Move down line. 2.1.1
<up arrow> Move up line. 2.1.1
<Enter> Move to beginning of next line. 2.1.1
<Home> Move to beginning of current line. 2.1.2
<End> Move to end of current line. 2.1.2
<Space> Move to next space character. 2.1.4
<PgDn> Move down screen. 2.2
<PgUp> Move up screen. 2.2
<+> Insert character. 3.1
<-> Delete Cursor. 3.2
<Backspace> Delete Left. 3.2
<F1>..<F10> Run macro. 4.9
Append 4.5
Insert Read another file into the current file.
List List disk directories.
Copy Copy a block of text. 4.3
Down Same as <PgDn> 2.2
Erase Erase text from file. 3.2
Format 4.7
Indent Indent block of text.
Undent Unindent block of text.
Goto 2.4
Top Move to the top of the file.
Bottom Move to the bottom of the file.
Line Move to specific line in the file.
1..8 Move to a pointer in the file.
Insert Add new text to file. 3.1
Locate Locate a word or phrase. 3.4
Move Move a block of text. 4.2
Next Show next prompt line. 1.4
Other Edit other file.
Pointer Set edit an pointer in file. 4.1
Quit Quit editing the current document. 1.7
Replace Replace word or phrase with another. 3.4
Setup 4.9
Auto indent Turn automatic indenting feature on or off.
Color Specify background and text colors.
Eoln char Specify end-of-line symbol.
Macros Enter new macros.
Tabs Specify tabs or spaces
Up Same as <PgUp> 2.2
View View another file. 4.8
Write Write a block of text to another file. 4.6
Xchng Overwrite characters in file. 3.3
Zap Delete a block of text. 4.4
A-1
Appendix B
Initial Macro Settings
Number Setting What it Does
------ ------- ------------
1 GT Goes to the top of the file.
2 GB Goes to the bottom of the file.
3 <Del><End><Del> Erases to the end of the
current line.
4 â <Home><Del><End><Del> Erases the current line.
5 P1 Sets pointer 1
6 P2 Sets pointer 2
7 C12 Copies 1 to 2
8 M12 Moves 1 to 2
9
10 QK Saves the current edit file
and exits the editor.
B-1